<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>用户登录</title>
    <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<body>
<div id="content">
    <form class="login-form" action="{$_home}auth/login" method="post" name="myform">
        <table>
            <tr>
                <td>账户：</td>
                <td><input type="text" name="username"/></td>
            </tr>
            <tr>
                <td>密码：</td>
                <td><input type="password" name="password"/></td>
            </tr>
            <tr>
                <td><input type="reset" value="重置"/></td>
                <td><input type="submit" value="登录"/></td>
            </tr>
            <tr style="text-align: center;">
                <td colspan="2">还没有账户？点击<a id="regist_b" style="text-decoration: none" href="#">&nbsp;这里&nbsp;</a>注册！
                </td>
            </tr>
        </table>
    </form>
    <form class="register-form" action="{$_home}auth/register" method="post">
        <table>
            <tr>
                <td>姓名：</td>
                <td><input type="text" name="fullname"/></td>
            </tr>
            <tr>
                <td>邮箱：</td>
                <td><input type="text" name="email"/></td>
            </tr>
            <tr>
                <td>注册账户：</td>
                <td><input type="text" name="username"/></td>
            </tr>
            <tr>
                <td>注册密码：</td>
                <td><input type="password" name="password"/></td>
            </tr>
            <tr>
                <td>确认密码：</td>
                <td><input type="password" name="rpassword"/></td>
            </tr>
            <tr>
                <td><input id="call_b" type="reset" value="返回"/></td>
                <td><input type="submit" value="注册"/></td>
            </tr>
        </table>
    </form>
</div>
<script type="text/javascript">
    $(".register-form").hide();
    $(document).ready(function () {
        $("#regist_b").bind('click', function () {
            $(".register-form").show();
            $(".login-form").hide();
        });
        $("#call_b").bind('click', function () {
            $(".register-form").hide();
            $(".login-form").show();
        });
    });
</script>
</body>
</html>